# -*- utf-8 -*-
# @Time: 2021/7/25 2:33
# @Author: CACode
from django.conf.urls import url
from django.urls import path

from . import views

urlpatterns = [
    url(r'list/$', views.NeedListView.as_view(), name="获取指定分类下的所有帖子"),
    url(r'my_needs/$', views.UserNeedListView.as_view({'post': 'post'}), name="获取指定用户的所有帖子"),
    url(r'off_shelf/$', views.UserNeedListView.as_view({'post': 'off_shelf'}), name="下载"),
    url(r'get/(?P<pk>\d+)/$', views.NeedItemView.as_view({'get': 'item'}), name="获取指定用户的所有帖子"),
    url(r'release/$', views.AddNeed.as_view({'post': 'release'}), name="发布"),
    url(r'upload/$', views.AddNeed.as_view({'post': 'upload_need'}), name="发布"),
    url(r'delete/$', views.AddNeed.as_view({'post': 'delete'}), name="彻底删除"),
]
